package com.plugin.wukong;

import android.app.Application;
import android.content.Context;

import com.ganide.wukit.kits.BaseKit;
import com.ganide.wukit.support_devs.eh_wk.EhAirplugKit;

public class SdkDemoApplication extends Application {
	private static Context ctx;
	private static BaseKit sdk;
	
	public static BaseKit getKit() {
		return sdk;
	}
	
	public static Context getAppContext() {
		return ctx;
	}
	
	@Override
	public void onCreate() {
		super.onCreate();
		ctx = getApplicationContext();
		startApp();
	}
	
	private void startApp() {
		sdk = EhAirplugKit.getInstance();
		sdk.init(getApplicationContext());
		sdk.setDebugEnable(true);
	}
	
	@Override
	public void onTerminate() {
		super.onTerminate();
		sdk.release();
	}
}
